package com.sc.nft.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sc.nft.entity.MallUserActivitySummary;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

public interface MallUserActivitySummaryMapper extends BaseMapper<MallUserActivitySummary> {


    /**
     * 更新累计消费金额
     *
     * @param userId 用户ID
     * @param amount 增加的消费金额
     * @return 更新的行数
     */
    int updateTotalConsumptionAmount(@Param("userId") Long userId, @Param("amount") BigDecimal amount);

    /**
     * 更新累计兑换金额
     *
     * @param userId 用户ID
     * @param amount 增加的兑换金额
     * @return 更新的行数
     */
    int updateTotalExchangeAmount(@Param("userId") Long userId, @Param("amount") BigDecimal amount);


}